<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="jquery-1.8.2.min.js"></script>
</head>
<body>
<button onclick="test()">提交</button>
</body>
</html>

<script>
  function test() {
    var postData = {
      'access_token': '9a8b4d1ff9446e510e0a39b3c7f619034f60c5f7',
      'state': 'on',
//      'platform': '3',
//      'id': '24',
//      'type': 'week',
//      'remark': '1',
//      'userName': 'cc2',
//      'passWord': 'cc123456'
    };
    $.ajax({
//      url: 'http://admin.bigxian.net:8080' + '?m=user.account.login',
      url: 'http://www.nboit.com:81/api/' + '?m=system.alarms.getAlarms',
//      url: 'http://www.nboit.com:81/api/' + '?m=user.account.login',
//      url: 'http://www.nboit.com' + '?m=system.Devices.device_info',
//      url: 'http://www.nboit.com' + '?m=user.account.login',
      data: postData,
      type: "post",
      dataType: "json",
      success: function (msg) {
        console.log(msg);
        if (msg.code == '0000') {
        }
        else {
//          $.alertMsg(msg.code_str);
        }
      }
    });
  }
</script>